home *** CD-ROM | disk | FTP | other *** search
- CHANGES FROM UNIX X TO DESQVIEW/X
-
- Because of the differences in operating systems, the DESQview/X implementation
- of the X Window System varies from the UNIX implementation. The primary
- areas of difference are explained in this chapter
-
- Directory Structure
-
- In DESQview/X, all X Window System files are relative to the directory
- into which DESQview/X has been installed. Clients, Demos and Include
- files are all located under the DESQview/X directory. Library files
- reside in \DVX\LIB\<compiler directory>. Bitmap files can be found
- in \DVX\include\X11\bitmaps.
-
- Resource Handling
-
- Under UNIX, X Window System Resource files are usually the client
- name. Under DESQview/X, an extension of '.res' has been added. e.g.,
- Xeyes becomes Xeyes.res.
-
- Application default resource files are located in the app-defa
- directory off the main DESQview/X directory and have an extension
- of .res. For example, the Xeyes resource file would be \DVX\app-defa\Xeyes.res
- by default.
-
- User default resource files are searched for in the home directory.
- This home directory is taken to be the directory into which DESQview/X
- has been installed, unless a HOME environment variable is set, e.g.
- .Xdefaults has been changed to \DVX\Xdefault.res, or HOME\Xdefault.res.
-
- Filename Changes
-
- Due to limitations of the DOS file system, some filenames have been
- changed. The resource filenames have been altered as described above.
- In addition, some bitmap and header files have been renamed. While
- DOS truncates long filenames to eight characters with a three character
- extension, there are some cases where the first eight characters of
- files are identical. In these cases, one of the filenames had to be
- altered.
-
- The following is a list of altered filenames which are taken from
- the UNIX2DVX.TXT file:
-
- ! This is the file used by UNIX2DVX
- ! it contains the differences in the format UNIX : DOS
- ! Any line preceded by an exclamation point (!) will be
- ! ignored. Blank lines are also ignored.
- !
- ! Xt Header file name differences
-
- X11/Intrinsic.h : X11/Intrinsc.h
- X11/IntrinsicI.h : X11/Intrinsi.h
- X11/IntrinsicP.h : X11/IntrinsP.h
- X11/CompositeI.h : X11/ComposiI.h
- X11/CompositeP.h : X11/ComposiP.h
- X11/ConstrainP.h : X11/ConstraP.h
-
- ! Xaw
- X11/Xaw/AsciiSinkP.h : X11/Xaw/asciisip.h
- X11/Xaw/AsciiSrcP.h : X11/Xaw/asciisrp.h
- X11/Xaw/AsciiTextP.h : X11/Xaw/asciitep.h
- X11/Xaw/MenuButtoP.h : X11/Xaw/menubutp.h
- X11/Xaw/PortholeP.h : X11/Xaw/portholp.h
- X11/Xaw/RepeaterP.h : X11/Xaw/repeatep.h
- X11/Xaw/ScrollbarP.h : X11/Xaw/scrollbp.h
- X11/Xaw/SimpleMenP.h : X11/Xaw/simplemp.h
- X11/Xaw/StripCharP.h : X11/Xaw/stripchp.h
- X11/Xaw/TemplateP.h : X11/Xaw/templatp.h
- X11/Xaw/TextSinkP.h : X11/Xaw/textsinp.h
- X11/Xaw/ViewportP.h : X11/Xaw/viewporp.h
-
- ! bitmap file name differences
- bitmaps/cntr_ptrmsk : bitmaps/cntr_ptr.msk
- bitmaps/left_ptrmsk : bitmaps/left_ptr.msk
- bitmaps/mailemptymsk : mailempty.msk
- bitmaps/mailfillmsk : mailfill.msk
- bitmaps/right_ptrmsk : right_ptr.msk
- bitmaps/opendotMask : opendot.Mas
- bitmaps/starMask : star.Mas
-
- ! Motif file name changes
- Xm/BaseClassP.h : Xm/BaseClaP.h
- Xm/BulletinBP.h : Xm/BulletBP.h
- Xm/CascadeBG.h : Xm/CascadBG.h
- Xm/CascadeBGP.h : Xm/CascaBGP.h
- Xm/CascadeBP.h : Xm/CascadBP.h
- Xm/CutPasteP.h : Xm/CutPastP.h
- Xm/DialogSEP.h : Xm/DialoSEP.h
- Xm/DragIconP.h : Xm/DragIcoP.h
- Xm/DragOverSP.h : Xm/DragOvSP.h
- Xm/DrawingAP.h : Xm/DrawinAP.h
- Xm/DropSMgrI.h : Xm/DropSMgI.h
- Xm/DropSMgrP.h : Xm/DropSMgP.h
- Xm/DropTransP.h : Xm/DropTraP.h
- Xm/MenuShellP.h : Xm/MenuSheP.h
- Xm/MessageBP.h : Xm/MessagBP.h
- Xm/MessagesI.h : Xm/MessagsI.h
- Xm/ProtocolsP.h : Xm/ProtocoP.h
- Xm/RowColumnP.h : Xm/RowColuP.h
- Xm/ScrollBarP.h : Xm/ScrollBP.h
- Xm/ScrolledWP.h : Xm/ScrollWP.h
- Xm/SelectioBP.h : Xm/SelectBP.h
- Xm/SeparatoG.h : Xm/SeparatG.h
- Xm/SeparatoGP.h : Xm/SeparaGP.h
- Xm/SeparatorP.h : Xm/SeparatP.h
- Xm/TearOffBP.h : Xm/TearOfBP.h
- Xm/TextFSelP.h : Xm/TextFSlP.h
- Xm/TextStrSoP.h : Xm/TextStSP.h
- Xm/ToggleBGP.h : Xm/TogglBGP.h
- Xm/TransltnsP.h : Xm/TransltP.h
- Xm/VirtKeysP.h : Xm/VirtKeyP.h
-
- DOS filenames are limited to a length of eight characters
- with a three character extension.
-
- Because there are cases where two or more files had
- identical names under DOS, some filenames had to be altered to prevent
- files from being overwritten.
-
- A list of truncated filenames can be found above.
-
- The UNIX2DVX.EXE Utility
-
- When porting programs from UNIX to DOS, it is tedious to manually
- alter truncated header file names in source code. The UNIX2DVX program
- is provided to automate the process of replacing header file names
- with their truncated equivalent.
-
- Unix2dvx consists of the executable (UNIX2DVX.EXE) and two ASCII text
- files, unix2dvx.txt, and wrapper.txt. The first text file, unix2dvx.txt
- is a list of all the header file names which have been changed, and
- what they have been changed to. Any line with an exclamation point
- (!) as its first character is ignored as a comment.
-
- The changes are in the format :
-
- oldheadername : newheadername
-
-
-
- Any whitespace on the line is ignored, and the two header names must
- be separated by a colon (:). The header file names must be complete,
- so to replace any occurences of X11/IntrinsicI.h, you must specify
- the following line,
-
- X11/IntrinsicI.h :X11/IntrinsI.h
-
- The default unix2dvx.txt file contains all the changes to the standard
- X11R5 header files, but it can be altered by the user to include any
- other header files they wish.
-
- The second file, wrapper.txt, contains the text that will be included
- at the point where a header file to be replaced is found. Again, any
- line preceded by an exclamation point is ignored as a comment. Unix2dvx
- does not simply do a search and replace on all the listed header files,
- but instead inserts the requested text at the required points in the
- code. By default, this text inserts the following :
-
- #ifdef MSDOS
- #include "$MSDOSNAME" /* QDK $DATE $TIME */
- #else
- #include "$UNIXNAME"
- #endif
-
- $MSDOSNAME and $UNIXNAME resolve to the header name to be replaced,
- and its new truncated name respectively, and date and time are replaced
- by the current date and time extracted from the system. With this
- configuration, when compiling under DOS, simply define MSDOS at compile
- time. This text could simply be replaced by :
-
- #include "$MSDOSNAME"
-
- This would result in a straight substitution of the header file names.
-
- Upon startup the executable (UNIX2DVX.EXE) first reads in the changes
- file, and checks it for simple syntax errors. This file default may
- be overridden by using the parameter -c=xxx.ext. If no path or drive
- is specified, the current directory is first searched, and then the
- directory of UNIX2DVX.EXE is searched. If no extension is provided,
- the default ".TXT" is used. The next file read is the wrapper
- text file. Again this may be overridden, using the -w=xxx.ext. The
- same search conditions apply as to the changes file.
-
- Wild cards are acceptable (*,?) in the input file spec. UNIX2DVX.EXE
- searches through the file, looking for #include statements, and then
- compares their contents to the list it read in from the unix2dvx.txt
- file. If it matches one, it then checks to see if it is contained
- within a conditional compiler statement already and compares the text
- surrounding the include statement to the wrapper insertion text read
- in from wrapper.txt.
-
- If both of these check out, it then inserts the appropriate text at
- that position.
-
- Note, any comments on the original line will be moved
- to below the wrapper text insertion in the processed file.
-
- When preprocessing is finished, the original file is renamed to a .BAK
- (in case you require it). All changes and warnings are written to
- stdout, and so may be redirected to a file.
-
- Command line switches
-
- Note : all switches may begin with either a '/' or a
- '-', they are not case sensitive, and may appear in any position and
- order on the command line.
-
- -?, -h[elp]: Provides a list of all switches and a brief description
- of each.
-
- -c=xxx.ext: Selects new changes file (discussed above).
-
- -w=xxx.ext: Selects new wrapper file (discussed above).
-
- -l: Lists on screen the changes that would be made, does not
- alter the input file.
-
- -i: Ignore Case. This will affect the comparisons between the
- header files in the source, and the list of files to be replaced in
- unix2dvx.txt (e.g. x11/IntrinsicI.h and X11/IntrinsicI.h will not
- match normally -- they will with this option.) This also affects
- the comparison between the wrapper text and the source file.
-
- -nw: No Wrapper check. Unix2dvx will not compare the wrapper
- text to the lines surrounding the #include in the source, to see if
- it has been previously preprocessed.
-
- -d=val: Set allowed depth of nested ifdefs. Normally, this defaults
- to zero, meaning if a header file which should be replaced is contained
- within a conditional statement, it will not be replaced. In some
- modules, and header files, this may need to be changed, because the
- entire code could be contained within an ifdef statement.
-